f = open("3.txt","w",encoding='utf8')
data = ['name\n','age\n','sex']
f.writelines(data)
f.close()